<!DOCTYPE html>
<html>
<head>
	<title></title>
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
	<link href="/sa-resources/login.css" rel="stylesheet">
</head>
<body>
<div style="height: 80px;"></div>
<h1 class="page-title"></h1>
<div style="height: 50px;"></div>
<div class="login">
	<div class="header">
		<div class="switch" id="switch"><a class="switch_btn_focus" href="javascript:void(0);" id="switch_qlogin"
		                                   tabindex="7">账号登录</a>
			<a class="switch_btn two-title" href="javascript:void(0);" id="switch_login" tabindex="8"></a>
			<div class="switch_bottom" id="switch_bottom" style="position: absolute; width: 64px; left: 0px;"></div>
		</div>
	</div>
	<div class="web_qr_login" id="web_qr_login" style="display: block; height: 235px;">

		<div class="web_login" id="web_login">
			<div class="login-box">
				<div class="login_form">
					<form accept-charset="utf-8" class="loginForm" id="login_form"
					      name="loginform">
						<input name="did" type="hidden" value="0"/>
						<input name="to" type="hidden" value="log"/>
						<div class="uinArea" id="uinArea">
							<label class="input-tips" for="username">帐号：</label>
							<div class="inputOuter" id="uArea">
								<input class="inputstyle" id="username" name="username" type="text"/>
							</div>
						</div>
						<div class="pwdArea" id="pwdArea">
							<label class="input-tips" for="username">密码：</label>
							<div class="inputOuter" id="pArea">
								<input class="inputstyle" id="password" name="password" type="password"/>
							</div>
						</div>
						<div style="padding-left:50px;margin-top:20px;">
							<input class="button_blue login-btn" id="login_btn" style="width: 208px;" type="button"
							       value="登 录"/>
						</div>
					</form>
				</div>
			</div>
		</div>

	</div>

	<div class="qlogin" id="qlogin" style="display: none; height: 235px;">
		<div class="web_login tow-content" id="guanyu"
		     style="padding: 2em 2em; color: #666; font-size: 14px; line-height: 24px;">

		</div>
	</div>

</div>
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/layer/3.0.1/layer.min.js"></script>
<script src="/res/sa.js"></script>
<script type="text/javascript">

    // 你所有要改的代码全在这里   ↓↓↓↓↓

    let page_title = '';		// 页面标题
    let two_title = '操作帮助';			// 第二个卡片的标题(最好四个字)
    var username = '';	// 默认的key
    var password = '';	// 默认的password
    let tow_content = '输入账号和密码，点击按钮登录即可';

    // 替换属性
    $('.page-title').html(page_title);
    $('title').html(page_title);
    $('[name=username]').val(username);
    $('[name=password]').val(password);
    $('.two-title').html(two_title);
    $('.tow-content').html(tow_content);

    $('#p').bind('keypress', function (event) {
        if (event.keyCode == "13") {
            $('.login-btn').click();
        }
    });
    $("#login_btn").bind("click", function () {
        sa.post("/user/login", JSON.stringify($("#login_form").serializeObject()), function (arg) {
            if (arg && arg.state) {
                window.location.href = '/';
            }
        })
    })


</script>
<!-- 卡片切换特效 -->
<script type="text/javascript">
    $(function () {
        $('#switch_qlogin').click(function () {
            $('#switch_login').removeClass("switch_btn_focus").addClass('switch_btn');
            $('#switch_qlogin').removeClass("switch_btn").addClass('switch_btn_focus');
            $('#switch_bottom').animate({
                left: '0px',
                width: '70px'
            });
            $('#qlogin').css('display', 'none');
            $('#web_qr_login').css('display', 'block');
        });
        $('#switch_login').click(function () {
            $('#switch_login').removeClass("switch_btn").addClass('switch_btn_focus');
            $('#switch_qlogin').removeClass("switch_btn_focus").addClass('switch_btn');
            $('#switch_bottom').animate({
                left: '154px',
                width: '70px'
            });
            $('#qlogin').css('display', 'block');
            $('#web_qr_login').css('display', 'none');
        });
    });

</script>
</body>
</html>
